<?php
//
// test HTTP POST submitter, using libcurl
//
include_once "config.php";
include_once "common.php";
error_reporting(E_ALL);

$auth =  $_COOKIE[$th_auth];
$username = $_COOKIE[$th_username];


//$subject_id = $_POST["subject_id"];
$subject_id = '18624';
//$watched_eps = $_POST["watched_eps"];
$watched_eps = '5';



if ($auth && !empty($auth) && $username && !empty($username)){
	//print $update;
	
	$action_url = 'http://api.bgm.tv/subject/'.$subject_id.'/update/watched_eps';
	$action_url = $action_url.'?source='.$source;

	$post_data = array ( 'auth' => ($auth),'watched_eps' => ($watched_eps));


	$update = curl_post($action_url, $post_data);



	//r/eturnError($update);




	print $update;
		


}
else{
printError();
}





?>